const router = [{
    path: "/all",
    name: "all",
    icon: "iconfont icon-all",
    description: "全部",
  },
  {
    path: "/landscape",
    name: "landscape",
    icon: "iconfont icon-landscape",
    description: "风景",
  },
  {
    path: "/beauty",
    name: "beauty",
    icon: "iconfont icon-beauty",
    description: "美女",
  },
  {
    path: "/car",
    name: "car",
    icon: "iconfont icon-roadster",
    description: "跑车",
  },
  {
    path: "/cartoon",
    name: "cartoon",
    icon: "iconfont icon-cartoon",
    description: "动漫",
  },
  {
    path: "/game",
    name: "game",
    icon: "iconfont icon-game",
    description: "游戏",
  },
  {
    path: "/background",
    name: "background",
    icon: "iconfont icon-background",
    description: "背景",
  },
  {
    path: "/animal",
    name: "animal",
    icon: "iconfont icon-animal",
    description: "动物",
  },
];

router.forEach((r) => {

  r.props = (route) => ({
    category: encodeURIComponent(route.query.category)
  });

  r.category = r.description;

  r.component = () => import( /* webpackChunkName: 'index.vue' */ "@/views/index.vue");
});

export default router;